package com.hfy.model.ws.privateMessage;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * @ author 韩
 * time: 2024/11/3 15:44
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class OriginalMessage {
    private Integer type;
    private String sessionId;
    private String toAccount;
    private String account;
    // 主要是json字符串
    private String data;
    private LocalDateTime sendTime;

    public Class<?> getSuitClass() {
        switch (type) {
            // 普通消息
            case 0 :
                return CommonMessage.class;
            default:
                return Object.class;
        }
    }

}
